﻿using RimWorld;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;


namespace Miao.Stand
{
    public class CompTargetEffect_StandTryAwake : CompTargetEffect
    {
        public override void DoEffectOn(Pawn user, Thing target)
        {
            Pawn owner = (Pawn)target;
            if (!owner.Dead)
            {
                DamageInfo dinfo = new DamageInfo(DamageDefOf.Scratch, 10,1, user.Rotation.AsAngle, user);
                owner.TakeDamage(dinfo);
                if (!owner.IsStandMaster())
                {
                    Hediff hediff = HediffMaker.MakeHediff(StandHediffDefOf.StandTryAwake, owner);
                    owner.health.AddHediff(hediff);
                }
            }
        }
    }
}
